﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddSubType.aspx.cs" Inherits="Com.CMS263.Web.manage.ManageArtType.AddSubType" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
        <link href="../style/main.css" rel="stylesheet" type="text/css" />
    <link href="../common/validator.css" rel="stylesheet" type="text/css" />
    <script language="javascript" src="/js/jquery-1.4.2.min.js"></script>
    <script language="javascript">
    function Del(id,obj)
    {
        if(confirm('真的要删除此类,删除此类时将同时删除其子类和以及子类下的所有内容'))
        {
            $.post("action.aspx?act=del", { id: id }, function(data) {
                if (data == "ok") {
                    alert('删除成功');
                    $(obj.parentNode.parentNode).remove();
                }
            });
        }
    }
    </script>
    <style type="text/css">
        .style1
        {
            width: 173px;
        }
        .style2
        {
            width: 198px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <table style="width:100%;">
            <tr class="table_2">
                <td  class="style1">
                    管理&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Label ID="typeName" runat="server" Text=""></asp:Label>
              </td>
              
            </tr>
          
           
        </table>
        <br />
    
       
    
    </div>
    
    <%if (typeId != 0)
      { %>
       <br />
        添加新类：<br />
        <table cellpadding="2" cellspacing="1" bgcolor="#CCCCCC"  style="width:80%;">
            <tr>
                <td bgcolor="#FFFFFF">
                    <div align="center">分类名</div></td>
                     <td  bgcolor="#FFFFFF">
                    排序编号
                    </td>
                <td bgcolor="#FFFFFF">
                    <div align="center">操作</div></td>
                   
            </tr>
           
            
            <%foreach (Com.CMS263.PO.ArtType at in list)
              {%>
            <tr>
                <td bgcolor="#FFFFFF">
                    <%=at.typeName %></td>
                    <td bgcolor="#FFFFFF"><%=at.orderId%></td>
                <td bgcolor="#FFFFFF">
                   <%if (showSub)
                     { %><a href="AddSubType.aspx?typeId=<%=at.id %>"> 添加子类</a><%} %> <a  onclick="Del(<%=at.id %>,this)"> 删除</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="mod.aspx?typeId=<%=at.id%>">修改</a></td>
              </tr>
              <%} %>
          
            
      </table>
        <table cellpadding="2" cellspacing="1" bgcolor="#CCCCCC" style="width:80%;">
            <tr>
                <td bgcolor="#FFFFFF" class="style1">&nbsp;
                    分类名称</td>
                <td bgcolor="#FFFFFF" class="style2">
    
        
    
       
    
                    <asp:TextBox ID="txtTypeName" runat="server"></asp:TextBox>
              </td>
                <td bgcolor="#FFFFFF">&nbsp;
                    <asp:HiddenField ID="hdfPid" runat="server" 
                        />
              </td>
            </tr>
          
           
            <tr>
                <td bgcolor="#FFFFFF" class="style1">排序编号</td>
                <td bgcolor="#FFFFFF" class="style2">
                    <asp:TextBox ID="txtOrderId" runat="server">0</asp:TextBox>
              </td>
                <td bgcolor="#FFFFFF">&nbsp;</td>
            </tr>
          
           
            <tr>
                <td bgcolor="#FFFFFF" class="style1">&nbsp;</td>
                <td bgcolor="#FFFFFF" class="style2">
                    <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="添加新类" 
                        Height="22px" />
              </td>
                <td bgcolor="#FFFFFF">&nbsp;</td>
            </tr>
          
           
      </table>
      <%} %>
    </form>
    
        </body>
</html>
